﻿<UserControl x:Class="PCSWpfClient.View.PricesView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:vi="clr-namespace:PCSWpfClient.View"
             
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary  Source="..\Resources\PriceResource.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <DockPanel>
        <CheckBox DockPanel.Dock="Top" Name="Mutliple">multiple selection</CheckBox>
        <ListBox DockPanel.Dock="Top" IsSynchronizedWithCurrentItem="True" SelectedIndex="0"
                        ItemContainerStyle="{StaticResource ContainerStyle}" SelectionMode="{Binding ElementName=Mutliple, Path=IsChecked, Converter={StaticResource BooleanToSelectedItemConverter}}" >
            <ListBoxItem>
                <vi:PriceSeriesPricesView />
            </ListBoxItem>
            <ListBoxItem>
                <vi:PriceSeriesDividendView />
            </ListBoxItem>
            <ListBoxItem>
                <vi:PriceSeriesStatisticsView />
            </ListBoxItem>
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel Orientation="Horizontal"  
                               ItemHeight="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualHeight}" />
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>

        </ListBox>
    </DockPanel>
</UserControl>
